// src/store/index.js
import { createStore } from 'vuex'

export default createStore({
  state: {
    user: {
      username: 'admin',
      company: '企业机构',
      phone: '15610565780',
      // 其他用户信息...
    }
  },
  mutations: {
    updateUser(state, payload) {
      state.user = { ...state.user, ...payload }
    }
  },
  actions: {
    // 可以添加获取用户信息的异步操作
  },
  getters: {
    getUser: state => state.user
  }
})